home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
misc
/
a8085.lha
/
A8085 V1.0
/
SRC
/
CrazySort.a
< prev
next >
Wrap
Text File
|
1995-07-31
|
718b
|
57 lines
;Crazy sort
org $1000
r: dc.b 13,3,7,12,2,9,1,10,4,45,23,12,54,56,198,43
dc.b 200,34,11,111,22,54,122,211,245,255,44,250,166
t: dc.b 5
x: dc.b r mod 256, r div 256
y: dc.b t mod 256, t div 256
start:
L71: lxi hl,x+1
mov d,m
dcx hl
mov e,m
lxi hl,y+1
mov b,m
dcx hl
mov c,m
mov h,b
mov l,c
b: mov a,m
xchg
cmp m
xchg
jnc cont
L73: mov b,m
xchg
mov c,m
mov m,b
xchg
mov m,c
cont:
dcx hl
L72: mov a,d
cmp h
jc b
jnz mx1
mov a,e
cmp l
jc b
mx1:
inx de
lxi hl,t
mov a,d
cmp h
jc b
jnz mx2
mov a,e
cmp l
jc b
mx2: hlt